package com.sxt.feign.rpc;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Created by Liushuangxi on 2019/8/22 8:21
 */
@FeignClient(name = "eureka-client")
public interface EurekaClientFeign {
    /**
     * 该方法调用eureka-client的info方法
     * @return
     */
    @GetMapping("/info")
    String info();

    /**
     * feign进行调用,参数超过一个需要加注解
     * @param page
     * @param size
     * @return
     */
    @GetMapping("/page")
    String getPage(@RequestParam("page") Integer page,@RequestParam("size") Integer size);

}
